﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace strategyPatternSample2
{
    public class mamal: animal
    {
        public iTalkingBehavior talkingBehavior;
        public mamal()
        {
            livingBehavior = new livingInLand();
        }

        public override void iam()
        {
            Console.WriteLine(" i am a mamal..");
        }

        public virtual void name()
        { }

        public void performTalking()
        {
            talkingBehavior.talking();
        }
    }
}
